package com.lfy.conf;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.Arrays;

@Configuration
public class MqConf {
    public static final String Mq_B = "test";
    public static final String Mq_Q = "one";

    @Bean
    public DirectExchange Exchange(){
        return new DirectExchange(Mq_B,true,false);
    }
    @Bean
    public Queue queue(){
        return new Queue(Mq_Q,true,false,false);
    }
    @Bean
    public Binding BbindQ(){
        return new Binding(Mq_Q, Binding.DestinationType.QUEUE, Mq_B,"tt", null);
    }


}
